Imports System.Xml.Serialization

Namespace CanvasDesigner

    Public Class Options
        Inherits XEntityModelElementBase

        ''' <summary>Initializes an instance of the <see cref="Options" /> class.
        ''' This is the default constructor for this class.</summary>
        Public Sub New()
            MyBase.New("Options", EdmxXmlNamespace)
        End Sub

        ''' <summary>Initializes an instance of the <see cref="Options" /> class.</summary>
        ''' <param name="other">An <see cref="System.Xml.Linq.XElement"/> object to copy from.</param>
        Public Sub New(ByVal other As XElement)
            MyBase.New(other)
        End Sub

        Private __designerInfoPropertySet As DesignerPropertyCollection

        <AutoLoad()> _
        <XmlElement("DesignerProperty", IsNullable:=False, Type:=GetType(DesignerProperty))> _
        Public ReadOnly Property DesignerInfoPropertySets() As DesignerPropertyCollection
            Get
                If (__designerInfoPropertySet Is Nothing) Then
                    Dim name = MyBase.Name.Namespace + "DesignerInfoPropertySet"
                    Dim el = Me.Element(name)
                    If (el Is Nothing) Then
                        el = New XElement(name)
                        Me.Add(el)
                    End If
                    __designerInfoPropertySet = New DesignerPropertyCollection(el, "DesignerProperty")
                End If
                Return __designerInfoPropertySet
            End Get
        End Property

    End Class

End Namespace